# Contributor: Daniel Gerber <dg@atufi.org>
# Maintainer: Sean McAvoy <seanmcavoy@gmail.com>
pkgname=bindfs
pkgver=1.17.6
pkgrel=0
pkgdesc="FUSE filesystem for mirroring a directory to another directory"
url="https://bindfs.org"
arch="all"
license="GPL-2.0-or-later"
makedepends="linux-headers fuse3-dev" # or fuse-dev
checkdepends="ruby ruby-etc"
subpackages="$pkgname-doc"
options="!check"
source="https://bindfs.org/downloads/bindfs-$pkgver.tar.gz
	musl-getmntent-issue.patch"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	# NOTE: this requires the fuse kernel module to be loaded
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
57a6cf3cdeb6a3ebdbcd59349e0f6fbcb60c4383a26ffc7be3b61152138d593f995501234cb5d4082e689b640de73efc60ce05219c3df1ff776498be27bfe0f1  bindfs-1.17.6.tar.gz
1c6491241393974923ed512ac2621c864f6f5e9f7e6faca83154cb785332049b49e18dda31ce297a4531bb0abf42d5039c996d0223eac105b0b7af377fd8c2ec  musl-getmntent-issue.patch
"
